const db = uniCloud.database()
const dbCmd = db.command;
module.exports = {
	async addChatList(talk_id, me_id, msg) {
		console.log("sb");
		const res = await db.collection('chatHistory').where({
			talk_id,
			me_id
		}).update({
			'chatList': dbCmd.push(msg)
		});
		return res;
	},

	async addMyOrder(user_id,order_id) {
		const res = await db.collection('jiajiao_users').doc(user_id).update({
			"orderList": dbCmd.push(order_id)
		})
		return res
	},

async addComment(user_id,object) {
		const res = await db.collection('jiajiao_users').doc(user_id).update({
			"comment": dbCmd.push(object)
		})
		return res
	}

}